#include "../ExEngine/input/dinput.h"
#include "../ExEngine/render/d3d.h"
#include "../ExEngine/engine/engine.h"
#include "scene.h"

HRESULT UpdateDemo(const float dt)
{
	
	pPlatform->Update(dt);
	pPlatform->Draw();

	pFire->setPosition(Vector3f(0,-8,0));
	pFire->Update(dt);
	pFire->Draw();

	if(CEngine::GetInstance()->GetInput()->isKeyReleased(DIK_R))
		CEngine::GetInstance()->GetRenderer()->ReloadResources(CD3D9Device::RESOURCE_ALL);

	float aa= 0.1;
	CEngine::GetInstance()->GetRenderer()->SetFogParamters(COLOR3F(aa,aa,aa));

	if(CEngine::GetInstance()->GetInput()->isKeyReleased(DIK_X))
	{
		if(CEngine::GetInstance()->GetRenderer()->GetRenderMode() != CD3D9Device::RenderMode::DEFAULT)
			CEngine::GetInstance()->GetRenderer()->SetRenderMode(CD3D9Device::RenderMode::DEFAULT);
		else
			CEngine::GetInstance()->GetRenderer()->SetRenderMode(CD3D9Device::RenderMode::LIGHTING);
	}

	return S_OK; 
}
